<script type="text/javascript" src="http://www.google.com/jsapi"></script> 
<script type="text/javascript"> 
    google.load('visualization', '1', {packages: ['corechart']});
</script> 
<script type="text/javascript"> 
    function drawVisualization() {
        // Create and populate the data table.
        var data = new google.visualization.DataTable();
        var raw_data = [['Austria', 13, 15, 157, 16, 1, 1],
            ['Belgium', 381, 39, 40, 460, 4, 67],
            ['Germany', 157, 17, 16, 18, 19, 19]];
        
            var years = [<?php foreach ($visitors as $key => $value) {
        echo $key.',';
} ?>];
                        
        data.addColumn('string', 'Year');
        for (var i = 0; i  < raw_data.length; ++i) {
            data.addColumn('number', raw_data[i][0]);    
        }
        
        data.addRows(years.length);
      
        for (var j = 0; j < years.length; ++j) {    
            data.setValue(j, 0, years[j].toString());    
        }
        for (var i = 0; i  < raw_data.length; ++i) {
            for (var j = 1; j  < raw_data[i].length; ++j) {
                data.setValue(j-1, i+1, raw_data[i][j]);    
            }
        }
        
        // Create and draw the visualization.
        new google.visualization.ColumnChart(document.getElementById('visualization')).
            draw(data,
        {title:"Site Analytics", 
            width:600, height:400,
            hAxis: {title: "Visits"}}
    );
    }
 
    google.setOnLoadCallback(drawVisualization);
</script> 

<div id="visualization" style="width: 600px; height: 400px;"></div> 